﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Runtime.Versioning;
using System.Text;
using System.Threading.Tasks;
using System.Configuration;
using DBUtility.Standard;

namespace ConsoleApp2
{
    internal class Program
    {
        static void Main(string[] args)
        {
            /*
            ProviderName的值
            PostgreSql：System.Data.PostgreSql
            SqlServer：Microsoft.Data.SqlClient
            MySql：MySql.Data.MySqlClient
            Oracle：System.Data.OracleClient
            PostgreSQL：System.Data.PostgreSQL
            OleDb：System.Data.OleDb
            */

            //string connectionName = "DefaultConnection";
            //string connectionString = ConfigurationManager.ConnectionStrings[connectionName].ToString();
            //string providerName = ConfigurationManager.ConnectionStrings[connectionName].ProviderName.Trim();

            //IDBHelper _idbHelper = DBHelperFactory.CreateInstance(connectionString, providerName);//创建接口//IDBHelper的实例


            string connectionName1 = "DefaultConnectionPostgreSql";
            string connectionString1 = ConfigurationManager.ConnectionStrings[connectionName1].ToString();
            string providerName1 = ConfigurationManager.ConnectionStrings[connectionName1].ProviderName.Trim();

            IDBHelper _idbHelper1 = DBHelperFactory.CreateInstance(connectionString1, providerName1);//创建接口//IDBHelper的实例
        }
    }
}
